Repository navigation
Run Map: watch for the sign-in from the user's own registry view - #1631
Conversation
After a renewal, Run Map held the Battle.net lock until it saw the launched client replace EDITOR_TOKEN, reading the token through reg.exe in Wurst's own registry view. Inside a packaged app whose private copy already held an EDITOR_TOKEN, that read never changed, so the lock stayed held for the full 120 s and every other launch waited. A small watcher script now starts outside Wurst's view right after the renewal, notes the renewed token before the game starts, and reports once the client replaces it. If it cannot start, Run Map reads the token from its own view as before. grill run does the same.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f64d5be729
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
If the sign-in watcher could not start and Wurst could not read the renewed EDITOR_TOKEN, the fallback check reported a sign-in at once, so the lock was released as the game started. Another renewal could then replace the token before that client read it. An unknown token now holds the lock until the timeout, as it did before the watcher.
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…read (#92) If the sign-in watcher could not start and grill's read of the renewed EDITOR_TOKEN failed, the fallback check took the next successful read for a sign-in and released the lock, so another renewal could replace the token before this client read it. An unknown token now holds the lock until the timeout. The same fix as Run Map's in wurstscript/WurstScript#1631.
Problem
After a renewal, Run Map holds the Battle.net sign-in lock until the launched client replaces
EDITOR_TOKEN, which it does as it signs in. It watched for that by reading the token throughreg.exein Wurst's own registry view.Inside a packaged (MSIX) app whose private registry copy already held an
EDITOR_TOKEN, that read never changes. The game is started in the user's own view (#1629), so its new token never shows in Wurst's copy. The lock then stayed held for the full 120 s after a successful sign-in, and every other Run Map orgrill runlaunch waited.Change
battlenet-signin.ps1(new resource) runs outside Wurst's view throughOutsideStart, right after the renewal and before the game starts. It notes the renewed token, printsready, then printssigned-inonce the token changes, ortimeout. It never prints a token.Renewalnow takes a sign-in check and a close action.releaseWhenSignedInpolls the watcher, and closing the renewal stops the watcher and removes its output file.readywithin 15 s, Run Map reads the token from its own view as before.grill run. The script is byte-identical.Validation
./gradlew compileJava test --tests '*BattleNet*' --tests '*OutsideStart*'passes: BattleNetSignInTest 18, OutsideStartTest 3, BattleNetLaunchWindowsTest 1. New tests cover:signed-inonce it is replaced.